<?php get_header(); ?>
<div class="cy-content">

	<?php get_sidebar();?>
    <div class="cy-content-center">
    <div class="cy-content-search">
    <?php 	  // Get terms for post
	$terms = get_the_terms( $post->ID , 'danh_muc_san_pham' );
	//  print_r($terms);	
	// Loop over each item since it's an array
	foreach( $terms as $term ) {
	// Print the name method from $term which is an OBJECT
	print $term->name;
	// Get rid of the other data stored in the object, since it's not needed
	unset($term);

} ?>
      <select name="theoten" id="theoten">
      <option value="#">Tìm theo tên</option>
      </select>
      <select name="theogia" id="theogia">
      <option value="#">Tìm theo giá</option>
      </select>
    </div><!--cy-content-search-->
    <div class="cy-content-title">
    <h2>camera quan sát</h2>
    </div><!--cy-content-title-->
 	<div class="cy-product-detail">
    <img src="<?php echo get('hinh');?>" />
     <ul class="cy-product-detail-i" >
         <li>Mã sản phẩm : <?php echo get('ma_san_pham');?></li>
         <li>Đơn vị tính : <?php echo get('don_vi_tinh');?></li>
         <li>Xuất xứ : <?php echo get('xuat_xu');?></li>
         <li>Trạng thái: <?php if(get('trang_thai')==0){echo "Còn hàng";}else{echo "Hết hàng";};?></li>
         <?php if(trim(get('gia_khuyen_mai')) !=""){?>
                         <div class="cy-price-gach">
                         Giá : <?php echo get('gia');?>
                         </div><!--cy-price-gach-->
                         <div class="cy-price-km">
                         Giá khuyến mãi : <?php echo get('gia_khuyen_mai');?>
                         </div><!--cy-price-km-->
                        <?php }else{?>
                         <div class="cy-price">
                         Giá : <?php echo get('gia');?>
                         </div><!--cy-price-->
                         <?php } ?>
     </ul><!--cy-product-detail-i-->

<table width="200" border="1">
  <tr>
    <td>MODEL</td>
    <td><?php the_title();?></td>
  </tr>
    <tr>
    <td>Độ phân giải hình ảnh</td>
    <td><?php echo get('do_phan_giai');?></td>
  </tr>
  <tr>
    <td>Lưu trữ</td>
    <td><?php echo get('luu_tru');?></td>
  </tr>
  <tr>
    <td>Tích hợp</td>
    <td><?php echo get('tich_hop');?></td>
  </tr>
  <tr>
    <td>Ống kính</td>
    <td><?php echo get('ong_kinh');?></td>
  </tr>
  <tr>
    <td>Ngõ kết nối</td>
    <td><?php echo get('ngo_ket_noi');?></td>
  </tr>
  <tr>
    <td>Anten kết nối mạng</td>
    <td><?php echo get('anten');?></td>
  </tr>
  <tr>
    <td>Tự động quay</td>
    <td><?php echo get('tu_dong_quay');?></td>
  </tr>

</table>
        
    </div><!--cy-product-detail-->

    </div><!--cy-content-center-->  
</div><!--cy-content-->
<?php get_footer(); ?>